Lecture Notes on Loop Transformations for Cache Optimization 15-411: Compiler Design
نویسنده
چکیده
In this lecture we consider loop transformations that can be used for cache optimization. The transformations can improve cache locality of the loop traversal or enable other optimizations that have been impossible before due to bad data dependencies. Those loop transformations can be used in a very flexible way and are used repeatedly until the loop dependencies are well aligned with the memory layout and cache effects are optimal. What is most important, however, is to keep track carefully under which circumstances the loop transformations are actually correct. We will pay attention to that. The same loop transformations are needed for loop parallelization and vectorization.
منابع مشابه
Lecture Notes on Linear Cache Optimization & Vectorization 15 - 411 : Compiler Design
The big missing questions on cache optimization are how and when generally to transform loops? What is the best choice to find a loop transformation? Is there a big common systematic picture? How to get fast by vectorizing and/or parallelizing loops after the loop transformations have made some loops parallelizable? And, finally, how can we use more fancy transformations for complicated problems.
متن کاملNotes on Linear Cache Optimization & Vectorization 15 - 411 : Compiler Design André Platzer
The big missing questions on cache optimization are how and when generally to transform loops? What is the best choice to find a loop transformation? Is there a big common systematic picture? How to get fast by vectorizing and/or parallelizing loops after the loop transformations have made some loops parallelizable? And, finally, how can we use more fancy transformations for complicated problems.
متن کاملLecture Notes on Cache Iteration & Data Dependencies 15 - 411 : Compiler Design
Cache optimization can have a huge impact on program execution speed. It can accelerate by a factor 2 to 5 for numerical programs. Loops are the parts of the program that are generally executed most often. That is why cache optimization usually focuses exclusively on handling loops. Especially for loops that execute very often, optimizing small chunks of source code can have a fairly significan...
متن کاملon Linear Cache Optimization & Vectorization 15 - 411 : Compiler Design André Platzer
We have seen a number of loop transformations, but they all have been different, needing different analysis and implementation. However, a closer look reveals that the previous list of loop transformations (permutation, reversal, skewing) all follow a general pattern of linear loop transformations. Each of those transformations (and combinations and many others) can be represented by unimodular...
متن کاملImproving Cache Locality by a Combination of Loop and Data Transformations
ÐExploiting locality of reference is key to realizing high levels of performance on modern processors. This paper describes a compiler algorithm for optimizing cache locality in scientific codes on uniprocessor and multiprocessor machines. A distinctive characteristic of our algorithm is that it considers loop and data layout transformations in a unified framework. Our approach is very effectiv...
متن کامل